package com.shopx.config.service;

import com.shopx.cmm.DTO.PageDTO;
import com.shopx.base.exception.ShopxException;
import com.shopx.config.bean.SysDict;
import com.shopx.config.model.SysDictModel;

import java.util.List;

/**
 * @author lituo
 * @className: ISysDictService
 * @description: TODO
 * @date 2021/12/5 10:42 AM
 */
public interface ISysDictService {

  /**
   * 查询
   */
  SysDictModel selectByPrimaryKey(SysDict sysDict) throws ShopxException;

  /**
   * 新增记录
   *
   * @param sysDict
   * @return
   * @throws ShopxException
   * @author lituo
   * @date 11:42 AM 2021/12/5
   */
  Integer insertSelective(SysDict sysDict) throws ShopxException;

  /**
   * 更新
   */
  Integer updateByPrimaryKeySelective(SysDict sysDict) throws ShopxException;

  /**
   * 删除
   */
  int deleteByPrimaryKey(SysDict sysDict) throws ShopxException;

  /**
   * 批量删除
   * @param list
   * @throws ShopxException
   */
  void deleteBatch(List<SysDict> list) throws ShopxException;

  /**
   * 查询总记录数
   *
   * @param sysDict
   * @return
   * @throws ShopxException
   * @author lituo
   * @date 11:42 AM 2021/12/5
   */
  int selectCount(SysDictModel sysDict) throws ShopxException;

  /**
   * 查询列表
   *
   * @param sysDict
   * @return
   * @throws ShopxException
   * @author lituo
   * @date 11:42 AM 2021/12/5
   */
  List<SysDictModel> selectList(SysDictModel sysDict) throws ShopxException;

  /**
   * 分页查询
   *
   * @param sysDictModel
   * @return
   * @throws ShopxException
   * @author lituo
   * @date 11:42 AM 2021/12/5
   */
  PageDTO<SysDictModel> getListPage(SysDictModel sysDictModel) throws ShopxException;

  /**
   * 根据name查询value
   *
   * @return java.lang.String
   * @author lituo
   * @date 11:14 PM 2022/2/10
   * @param  dictCode
   * @param  dictName
   */
  String queryValueByName(String dictCode, String dictName);

}

